package com.inspur.cloud.demo.service.flinksql;

import com.inspur.cloud.demo.entity.FlinkConfig;
import com.inspur.cloud.demo.util.Response;

import java.util.List;
import java.util.Map;

public interface FlinkSqlService {

    //获取配置信息
    FlinkConfig getFlinkConfig();

    //运行一个动态sql
    public Response<?> runSql(Map<String, Object> param)  throws Exception;

    //运行一个动态sql
    public Response<?> runSql(String notebookid,String paragraphsid,Map<String,Object> param)  throws Exception;

    //运行一个动态sql
    public Response<?> addParagraph(String notebookid,Map<String, Object> param)  throws Exception;

    //运行一个动态sql
    public Response<?> saveParagraph(String notebookid,String paragid,Map<String, Object> param)  throws Exception;
    //删除一个动态sql
    public Response<?> deleteParagraph(String notebookid,String paragid)  throws Exception;

    //执行动态语句
    public Response<?> createDynamicSql() throws Exception;

    //创建任务组
    //public Response<?> createGroupJobSql(Map<String,Object> param) throws Exception;

    //创建子任务
    //public Response<?> createSubJobSql(Map<String,Object> param) throws Exception;

    //运行一个任务组
    //public Response<?> runGroupSql(Map<String,Object> param)  throws Exception;

    //停止一个任务组
    //public Response<?> stopGroupSql(Map<String,Object> param)  throws Exception;

    //查询所有任务组
    public Response<?> queryGroupJobSql();
    //查询所有子任务组名称
    public Response<?> querySubGroupJobSql(Map<String, Object> param);

    //停止一个任务组
    //public Response<?> stopSubJobSql(Map<String,Object> param)  throws Exception;

}
